package org.example.demo;

import java.io.File;

/**
 * @ClassName Demo2
 * @Description
 * @Author zhangsw
 * @Date 2020/11/9 15:57
 * @Version 1.0
 */
public class Demo2 {
    public static void main(String[] args) {
        File file = new File("D:\\Users\\zhangsw\\Desktop\\转正申请-张士威");
        File[] files = file.listFiles(path -> path.toString().endsWith(".jpg") ||
                path.toString().endsWith(".png"));
        for (File file1 : files) {
            System.err.println(file1.getName());
        }
    }
}
